package com.beidu.lottery.call.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.beidu.lottery.call.entity.ParticipationVote;
import com.beidu.lottery.call.entity.query.JoinListQuery;
import com.beidu.lottery.call.entity.vo.ActivityVoteListVO;
import com.beidu.lottery.call.entity.vo.ActivityVoteRankVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 投票活动参与表 Mapper 接口
 * </p>
 *
 * @author 北渡
 * @since 2023-08-10
 */
public interface ParticipationVoteMapper extends BaseMapper<ParticipationVote> {

    List<ActivityVoteListVO> queryByActivity(JoinListQuery query);

    List<ActivityVoteRankVO> queryVoteRank(JoinListQuery query);

    Integer countVoteByActivityId(@Param("activityId") Integer activityId);

    Integer deleteSearch(@Param("ids") List<Integer> ids);

}
